<template>
  <div id="app">
    <Header></Header>
    <!---路由组建出口-->
    <router-view></router-view>
    <!-- <Footer v-show="$route.path=='/home'||$route.path=='/search'"></Footer> 并非最好的解决方案-->
    <Footer v-show="$route.meta.show"></Footer>
    <!-- 在路由js文件里查看meta -->

  </div>
</template>

<script>
import Header from "./components/Header";
import Footer from "./components/Footer";
export default {
  name: "App",

  components: {
    Header,
    Footer,
  },

  data() {
    return {};
  },
  created() {},
  mounted() {
    //获取三级分类数据
    this.$store.dispatch('categoryList');
  },
};
</script>

<style></style>